home *** CD-ROM | disk | FTP | other *** search
/ Mail Madness! 30 / Mail_Madness_30_200x_-_Side_B.d64 / temple of doom (.txt) < prev   
Commodore BASIC  |  2023-02-26  |  9KB  |  336 lines

  1. 2 rem ******************
  2. 3 rem *   the temple   *
  3. 4 rem *    of doom.    *
  4. 5 rem *   version--3   *
  5. 6 rem ******************
  6. 7 poke775,200
  7. 8 u$="0:":w$=",s,r":z=1:d=0:s=54272:ml=15:b=0:ef=.99
  8. 9 l$="[218]":gs=1:dima$(21)
  9. 10 print"[147]":poke53280,0:poke53281,0
  10. 12 print"  [164][164][162][162][162]   [146] the temple of doom    [146][162][162][162][164][164]"
  11. 13 print"[163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  12. 15 print"       distributed by: [154]jiantware"
  13. 20 ifre<>1thengosub2000
  14. 30 printtab(9)"[213][195][195][201] [213][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][201]"
  15. 31 printtab(9)"[194]f1[194] [194]to play         [194]"
  16. 32 printtab(9)"[194]  [194] [194]                [194]"
  17. 33 printtab(9)"[194]f3[194] [194]for instructions[194]"
  18. 34 printtab(9)"[194]  [194] [194]                [194]"
  19. 35 printtab(9)"[194]f5[194] [194]view items      [194]"
  20. 36 printtab(9)"[194]  [194] [194]                [194]"
  21. 37 printtab(9)"[194]f7[194] [194]view credits    [194]"
  22. 38 printtab(9)"[202][195][195][203] [202][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][203]"
  23. 40 geta$:ifa$=""then40
  24. 45 ifa$="[133]"then50
  25. 46 ifa$="[134]"then1600
  26. 47 ifa$="[135]"then1690
  27. 48 ifa$="[136]"then1640
  28. 49 goto40
  29. 50 gosub1710
  30. 51 gosub2600
  31. 52 gosub2070
  32. 95 pp=p:p1=p+54272
  33. 99 gosub852
  34. 100 pokep,ch:pokep1,1
  35. 110 print"":print"[156]level:";lv;lv$
  36. 115 print"[145]score:";sc
  37. 120 print"[145]lives:";li
  38. 130 ifpeek(p+40)<>32thengoto1000
  39. 135 pokes+24,15:pokes+6,9:pokes+5,10:pokes+1,240:pokes+4,17
  40. 140 p=p+40:p1=p1+40
  41. 145 ifsc>999999thensc=0:print"      "
  42. 150 print"":print"[156]level:";lv;lv$
  43. 155 print"[145]score:";sc
  44. 160 print"[145]lives:";li
  45. 170 pokep,ch:pokep1,1
  46. 180 pokep-40,32:pokep1-40,0
  47. 190 pokes+4,16:goto130
  48. 200 pokep,ch:pokep1,1
  49. 214 gosub2500
  50. 215 ifge>efthengosub 400
  51. 220 jy=peek(56320):fr=jyand16:jy=15-(jyand15)
  52. 221 getq$:ifq$=""then225
  53. 222 ifq$="k"thengosub1908:goto700
  54. 223 ifq$="p"then2700
  55. 225 iffr=0thengoto300
  56. 230 ifjy=0thengoto200
  57. 231 pokep,32:pokep1,0
  58. 240 ifjy=8thenp=p+1:p1=p1+1:c=1
  59. 250 ifjy=4thenp=p-1:p1=p1-1:c=-1
  60. 260 ifpeek(p)<>32thenp=p-c:p1=p1-c
  61. 270 pokep,ch:pokep1,1
  62. 271 ifc=1andch=114thench=115:goto280
  63. 272 ifc=1thench=114
  64. 273 ifc=-1andch=116thench=117:goto280
  65. 274 ifc=-1thench=116
  66. 280 goto130
  67. 284 ifsc=>x3andsc<x2thenx3=sc
  68. 300 ifpeek(p-40)<>32thengoto1100
  69. 301 pokes+24,5:pokes+6,9:pokes+5,11:pokes+1,2:pokes+4,129
  70. 303 pokep,32:pokep1,0
  71. 304 gosub2500
  72. 305 ifge>efthengosub400:goto130
  73. 310 p=p-40:p1=p1-40
  74. 320 pokep,118:pokep1,1
  75. 330 fort=1to50:next
  76. 340 pokep,32
  77. 350 jy=peek(56320):fr=jyand16:jy=15-(jyand15)
  78. 360 ifjy=8thenp=p+1:p1=p1+1:c=1
  79. 370 ifjy=4thenp=p-1:p1=p1-1:c=-1
  80. 380 ifpeek(p)<>32thenp=p-c:p1=p1-c:goto130
  81. 390 iffr=0thenpokes+4,128:goto300
  82. 395 goto100
  83. 400 :
  84. 405 pokep,ch:pokep1,1
  85. 410 a=int(rnd(1)*20)+1:a=a*40
  86. 420 en=e+a:cu=en
  87. 430 ifen<1102oren>1902then410
  88. 440 ifpeek(en)<>32then410
  89. 445 sh=rnd(1):ifsh=<.49thenf=107:fc=8:co=32:dl=20
  90. 446 iffc=8thengosub1910
  91. 450 ifsh=>.50thenf=108:fc=1:co=108:cp=1:dl=0
  92. 452 ifpeek(en)<>32thengoto1200
  93. 453 iffc=1thenpoke54296,15:poke54296,0
  94. 455 pokeen,f:pokeen+cc,fc
  95. 456 fort=0todl:next
  96. 460 pokeen,co
  97. 461 en=en-1
  98. 465 goto452
  99. 470 iff=107thengoto499
  100. 475 ifpeek(cu)<>108thengoto499
  101. 476 pokecu,32:cu=cu-1:goto475
  102. 499 fc=0:return
  103. 620 :
  104. 640 data 254,254,254,0,247,247,247,0
  105. 641 data 0,28,20,28,8,62,8,8
  106. 642 data 119,119,119,34,34,34,0,0
  107. 643 data 0,0,34,34,34,119,119,119
  108. 644 data 255,219,253,255,159,251,251,255
  109. 645 data 0,0,32,67,254,67,32,0
  110. 646 data 0,0,16,40,36,66,129,0
  111. 647 data 0,0,0,0,24,60,102,219
  112. 648 data 0,0,60,60,60,60,0,0
  113. 649 data 0,0,0,124,254,124,56,16
  114. 650 data 254,254,254,0,247,247,247,0
  115. 651 data 24,126,62,124,63,56,8,4
  116. 652 data 14,14,28,46,73,12,58,2
  117. 653 data 14,14,24,110,8,20,36,32
  118. 654 data 112,112,56,116,146,48,92,64
  119. 655 data 112,112,24,118,16,40,36,4
  120. 656 data 56,56,16,254,16,56,40,40
  121. 657 data 1,3,7,0,23,55,119,0
  122. 658 data 128,192,224,0,232,236,238,0
  123. 659 data 254,126,62,0,15,7,3,0
  124. 660 data 255,254,252,0,240,224,192,0
  125. 700 :
  126. 710 li=li-1:ifli=0then800
  127. 715 ifcp=1thengosub475
  128. 720 fort=0to200:next:pokep,32:p=pp:p1=p+54272:goto100
  129. 739 pokep,32
  130. 740 gosub1915
  131. 741 ifpeek(p-40)<>32then710
  132. 742 p=p-40:p1=p1-40:pokep,113:pokep1,12
  133. 743 fort=0to50:next:pokep,32:goto741
  134. 750 ifpeek(p+40)<>32then710
  135. 755 p=p+40:p1=p1+40:pokep,ch:pokep1,1
  136. 760 fort=0to50:next:pokep,32:goto750
  137. 800 :
  138. 805 cn=1
  139. 806 print"0[146]"
  140. 810 print"":printtab(14)"[159][213][195][195][195][195][195][195][195][195][195][201]":printtab(14)"[145][194]game over[159][194]"
  141. 811 printtab(14)"[202][195][195][195][195][195][195][195][195][195][203]":fort=0to900:next:print""
  142. 812 printtab(11)"[213][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][201]"
  143. 813 ifb>10thenprint"[145][145]":goto816
  144. 814 printtab(11)"[145][194][154]button[146] quit    [194]"
  145. 815 printtab(11)"[194]               [194]"
  146. 816 printtab(11)"[145][194][154]  up  [146] re-start[194]"
  147. 817 printtab(11)"[202][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][203]"
  148. 825 gosub2300
  149. 826 gosub1910
  150. 830 ifre=1thensc=0:li=3:b=0:ef=.99:goto10
  151. 835 ifre=2thensys64738
  152. 850 :
  153. 852 pokep,ch:pokep1,0:t=81:gosub1922:fort=0to200:next
  154. 853 pokep1,11:t=62:gosub1922:fort=0to200:next
  155. 855 pokep1,12:t=45:gosub1922:fort=0to200:next
  156. 860 pokep1,15:t=28:gosub1922:fort=0to200:next
  157. 862 pokep1,1:t=12:gosub1922:pokes+4,0:return
  158. 940 :
  159. 950 pokep,ch:pokep1,1:t=12:gosub1922:fort=0to200:next
  160. 952 pokep1,15:t=28:gosub1922:fort=0to200:next
  161. 954 pokep1,12:t=45:gosub1922:fort=0to200:next
  162. 956 pokep1,11:t=62:gosub1922:fort=0to200:next
  163. 958 pokep1,0:t=81:gosub1922:fort=0to200:next:pokes+4,0:return
  164. 1000 :
  165. 1010 ifpeek(p+40)=>102andpeek(p+40)=<104thengoto200
  166. 1011 ifpeek(p+40)=>121andpeek(p+40)=<122thengoto200
  167. 1015 ifpeek(p+40)=119thensl=39:ch=116:goto1500
  168. 1016 ifpeek(p+40)=120thensl=41:ch=114:goto1500
  169. 1020 ifpeek(p+40)=105thengosub1908:goto710
  170. 1030 ifpeek(p+40)=106then739
  171. 1040 ifpeek(p+40)=109thensc=sc+50:gosub1905:goto140
  172. 1050 ifpeek(p+40)=110thensc=sc+75:gosub1905:goto140
  173. 1060 ifpeek(p+40)=111thensc=sc+100:gosub1905:goto140
  174. 1070 ifpeek(p+40)=112thengosub1917:pokep,32:p=p+80:p1=p1+80:goto1190
  175. 1100 ifpeek(p-40)=102then130
  176. 1101 ifpeek(p-40)=112then130
  177. 1102 ifpeek(p-40)=>119andpeek(p-40)=<122then130
  178. 1103 if peek(p-40)=>109andpeek(p-40)=<111then130
  179. 1104 ifpeek(p-40)=105then130
  180. 1110 ifpeek(p-40)=104thengosub1908:goto750
  181. 1120 ifpeek(p-40)=103thengosub950:gosub1912:gosub1710:gosub2600:gosub2090:goto95
  182. 1190 pokep,ch:pokep1,1:goto190
  183. 1199 :
  184. 1200 ifpeek(en)=>114andpeek(en)=<117thengosub1908:goto710
  185. 1210 pokeen+1,32:goto470
  186. 1300 :
  187. 1310 print"[153] level   [157][157][157]";
  188. 1320 c$="-":q=2:g$=""
  189. 1325 printc$"[157]";
  190. 1330 getq$
  191. 1335 ifq$=chr$(13)then1375
  192. 1340 ifq$=chr$(20)theniflen(g$)>0theng$=left$(g$,len(g$)-1):goto1370
  193. 1350 ifq$=>"0"andq$=<"9"then1360
  194. 1355 goto1325
  195. 1360 iflen(g$)<qthenprintq$;:g$=g$+q$
  196. 1365 goto1325
  197. 1370 print"[157] [157]";:goto1325
  198. 1375 print" ":l=val(g$):ifl=0then1310
  199. 1376 ifl>10then1310
  200. 1377 gosub1908:print" level   [157][157][157]";g$
  201. 1378 b=l:return
  202. 1500 :
  203. 1510 p=p+sl:p1=p1+sl
  204. 1520 pokep,ch:pokep1,1
  205. 1530 pokep-sl,32
  206. 1535 ifpeek(p+sl)=32thengoto130
  207. 1540 goto1000
  208. 1600 rem *** instructions ***
  209. 1610 poke53280,0:poke53281,0:print"[147]"
  210. 1620 print">[156]the object of the game is to collect"
  211. 1621 print"all of the treasure on each of"
  212. 1622 print"15 levels. you may not always be able"
  213. 1623 print"to get all of the treasures on every"
  214. 1624 print"level. to get a treasure you must fall"
  215. 1625 print"on it from above."
  216. 1626 print">[156]you may leave a level at any time by"
  217. 1627 print"touching an onk ([167]) from the bottom."
  218. 1628 print">[156]you get an extra man every third level."
  219. 1629 print">[156]use the joystick in port #2."
  220. 1630 print"        press any key to continue"
  221. 1631 geta$:ifa$=""then1631
  222. 1632 print"[147]":print">[156]at any time you can pause the game by"
  223. 1633 print"pressing 'p'."
  224. 1634 print">[156]if you ever get trapped and need to"
  225. 1635 print"kill yourself you can press 'k'."
  226. 1636 print"       press any key to continue"
  227. 1637 geta$:ifa$=""then1637
  228. 1638 re=1:goto10
  229. 1640 rem *** credits ***
  230. 1641 poke53280,0:poke53281,0:print"[147]"
  231. 1642 print"game design and concept by: [156]jamie cross"
  232. 1643 print"  i spent many hours working on this"
  233. 1644 print"program, and feel that the time was"
  234. 1645 print"well spent. i think you will find this"
  235. 1646 print"game entertaining and challenging for"
  236. 1647 print"quite awhile. if you do find that you"
  237. 1648 print"like this game i would greatly"
  238. 1649 print"appreciate any contribution you could"
  239. 1650 print"make. it would surely increase the"
  240. 1651 print"likely hood of any sequals or expansion"
  241. 1652 print"levels. if you can make a contribution,"
  242. 1653 print"include your return address and i will"
  243. 1654 print"notify you if there are any expansion"
  244. 1655 print"levels. i would send you them free if"
  245. 1656 print"you were to send me a disk and a sase."
  246. 1657 print"if you can't make a contribution or"
  247. 1658 print"if you feel the game doesn't deserve"
  248. 1659 print"one. id still like to hear what you"
  249. 1670 print"think of the program."
  250. 1671 print"       press any key to continue"
  251. 1672 geta$:ifa$=""then1672
  252. 1673 print"[147]"
  253. 1674 print"my address is:  [156]jamie cross"
  254. 1675 printtab(16)"130 castle dr #23"
  255. 1676 printtab(16)"bethle park, pa"
  256. 1677 printtab(16)"15102"
  257. 1678 print"      i hope you enjoy the game!"
  258. 1679 print"      [163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  259. 1680 print"      press any key to continue"
  260. 1681 geta$:ifa$=""then1681
  261. 1682 re=1:goto10
  262. 1690 rem *** items ***
  263. 1691 poke53280,0:poke53281,0:print"[147]"
  264. 1692 print"                 items":print"                 [163][163][163][163][163]"
  265. 1693 printtab(13)"arrow ------ [149][171]":printtab(13)"lightening - [172][172]"
  266. 1694 printtab(13)"jewel ------ [153][175]":printtab(13)"gold block - [158][174]"
  267. 1695 printtab(13)"gold coins - [158][173]":printtab(13)"lava ------- [170]"
  268. 1696 printtab(13)"onk -------- [167]":printtab(13)"spikes ----- [152][168] [169]"
  269. 1697 print"                beware:"
  270. 1698 print"[156]   there may be other hidden dangers!"
  271. 1699 print"       press any key to continue"
  272. 1700 geta$:ifa$=""then1700
  273. 1701 re=1:goto10
  274. 1710 ifgs=1thenb=b+1
  275. 1715 ifb>mlthenb=1:ef=ef-.02:lv$=lv$+l$
  276. 1720 lv=b
  277. 1726 ifd/2=int(z)thenli=li+1:z=z+1
  278. 1727 d=d+1
  279. 1730 return
  280. 1900 :
  281. 1905 pokes+24,15:pokes+1,104:pokes+4,17:pokes+5,10:pokes+6,9:pokes+4,16:return
  282. 1908 pokes+24,15:pokes+1,15:pokes+6,9:pokes+5,10:pokes+4,17:fort=1to60:next
  283. 1909 pokes+1,12:fort=1to70:next:pokes+4,16:return
  284. 1910 pokes+24,15:pokes+1,6:pokes+6,9:pokes+4,33:pokes+5,10:pokes+4,32:return
  285. 1912 pokes+24,15:pokes+4,17:pokes,100:pokes+5,17:pokes+6,241:fort=0to255
  286. 1913 pokes+1,t:next:pokes+4,0:return
  287. 1915 pokes+24,15:pokes+1,7:pokes+5,25:pokes,240:pokes+4,129:return
  288. 1917 pokes+24,15:pokes+6,9:pokes+5,10:pokes+1,240:pokes+4,17:pokes+4,16:return
  289. 1919 pokes+24,15:pokes,29:pokes+1,134:pokes+5,132:pokes+6,128:pokes+15,67
  290. 1920 pokes+14,14:pokes+4,19:fort=0to80:next:pokes+4,0:return
  291. 1922 pokes+24,15:pokes+6,9:pokes+5,10:pokes+1,t:pokes+4,17:poke2+4,16:return
  292. 2000 c=6:poke53272,(peek(53272)and240)or2*c
  293. 2010 q=53248:e=55296:n=12288
  294. 2020 poke56333,127:poke1,51
  295. 2030 l=e-q:en=l+n
  296. 2031 a%=l/256:a=l-256*a%:v=en-a:b%=v/256:w=en-256*b%-a:vv=e-a:c%=vv/256
  297. 2035 c=e-256*c%-a
  298. 2040 poke781,a%+1:poke782,a:poke90,c:poke91,c%:poke88,w:poke89,b%:sys41964
  299. 2045 poke1,55:poke56333,129
  300. 2050 poke56,48
  301. 2060 forda=13104to13271:readgr:pokeda,gr:next
  302. 2065 return
  303. 2070 lv=b:sc=0:li=3:cc=54272:ch=114:e=1102
  304. 2090 fort=1024to1063:poket,102:poket+cc,bc:next:fort=1904to1943:poket,102
  305. 2100 poket+cc,bc:next:fort=1064to1904step40:poket,102:poket+cc,bc:next
  306. 2110 fort=1063to1943step40:poket,102:poket+cc,bc:next
  307. 2111 fort=0to1500:next
  308. 2115 fort=1944to1983:poket,160:poket+cc,4:next:fort=1984to2023:poket,160
  309. 2116 poket+cc,4:next
  310. 2130 return
  311. 2300 :
  312. 2310 jy=peek(56320):fr=jyand16:jy=15-(jyand15)
  313. 2311 ifb>10thengoto2321
  314. 2320 iffr=0thengosub1908:re=2:return
  315. 2321 ifcn=1andjy=1thenre=1:return
  316. 2330 goto 2310
  317. 2500 :
  318. 2510 ge=rnd(1)
  319. 2520 return
  320. 2600 :
  321. 2605 v$="b"+str$(b)
  322. 2610 open2,8,2,u$+v$+w$
  323. 2620 fori=0to21:input#2,a$(i):nexti
  324. 2630 input#2,p
  325. 2640 input#2,bc
  326. 2650 print"[147]":poke53280,3:poke53281,0
  327. 2660 fori=0to21:print"[145]"a$(i):next
  328. 2670 close2
  329. 2680 return
  330. 2700 :
  331. 2701 gosub1919
  332. 2702 poke53280,14
  333. 2705 getq$:ifq$<>"p"then2705
  334. 2706 gosub1919
  335. 2710 poke53280,3:goto100
  336.